﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DAL;
using BLToolkit.DataAccess;
using BLToolkit.Mapping;
using Entities.Admin;

namespace Entities.TBKN
{
    public class KhieuNai:BaseEntity<KhieuNai>
    {
         [MapField("MaKhieuNai"), PrimaryKey]
         public string MaKhieuNai { get; set; }
         public string TenKhieuNai { get; set; }
         public string NguoiGui { get; set; }
            [MapField("NguoiNhan")]
         public string IdNguoiNhan { get; set;}
         
         [MapIgnore]
         public string TenNguoiNhan
         {
             get
             {
                 NhanVien nv = NhanVien.Objects.GetById(IdNguoiNhan);
                 if (nv != null)
                     return nv.TenNhanVien;
                 else return "";
             }
         }
         public DateTime NgayGui { get; set; }
         public DateTime NgayTraLoi { get; set; }
         public int TrangThai { get; set; }
         public string NoiDung { get; set; }
    }
}
